package com.mall.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.mall.bean.Goods;
import com.mall.dao.GoodsDao;
import com.mall.service.IGoodsService;

@Service("Goodsservice")
public class GoodsServiceImpl implements IGoodsService {
	
	@Resource
	private GoodsDao goodsDao;
	//增加书
	@Override
	public int addGoods(Goods goods) {
		return goodsDao.addGoods(goods);
	}
	//查书
	public List<Goods> findGoods(Goods goods) {
		
		return goodsDao.findGoods(goods);
	}
	//用户发表书到易货回收
	@Override
	public boolean addAutoGoods(Goods goods) {
		// TODO Auto-generated method stub
		return goodsDao.addAutoGoods(goods);
	}
	//管理员查询展示商品
	@Override
	public List<Goods> findAutoGoods(Goods goods) {
		// TODO Auto-generated method stub
		return goodsDao.findAutoGoods(goods);
	}
}
